import React from "react";
import classNames from "classnames";

interface ButtonProps {
  primary?: boolean;
  disabled?: boolean;
}

const Button: React.FC<ButtonProps> = ({ primary, disabled }) => {
  // primary为true时会拼接出“button button--primary"字符串
  const buttonClassNames = classNames("button", {
    "button--primary": primary,
    "button--disabled": disabled,
  });

  return <button className={buttonClassNames}>按钮</button>;
};

export default Button;
